var isPalindrome = function(x) {
    if(x < 0) return false
    x = x.toString()
    x = x.split('')
    let y = [...x].reverse()
    console.log(x,y)
    if(x.toString() == y.toString()){
        return true
    }else{
        return false
    }
};
console.log(isPalindrome(121))